package com.zhentao.controller;

import com.zhentao.model.common.buiness.pojo.Orders;
import com.zhentao.model.common.buiness.vo.OrdersVo;
import com.zhentao.model.common.dtos.ResponseResult;
import com.zhentao.service.ApOrdersService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@RestController
@RequestMapping("/orders")
@Api(tags = "ApOrder",description = "订单")
public class ApOrderController {
    @Resource
    private ApOrdersService apOrdersService;
    @ApiOperation("用户端：订单查询")
    @PostMapping("/ordersList")
    public ResponseResult list(@RequestBody OrdersVo ordersVo){
        return apOrdersService.orderslist(ordersVo);
    }
    @PostMapping("/orderadd")
    @ApiOperation("用户端：订单添加")

    public ResponseResult add(@RequestBody Orders orders){
        return apOrdersService.ordersadd(orders);
    }
    @PostMapping("/orderstatus")
    @ApiOperation("用户端：订单修改")

    public ResponseResult orderstatus(@RequestBody Orders orders){
        return apOrdersService.orderststus(orders);
    }
}
